Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Monitor  Event  Log  Messages  for  Specific  Words  

 Content of Monitor Event Log Messages for Specific Words.vbs
MD5 Hash: 6E1C518A32A37676487CB054CD8EC288
strComputer = "."

Set objWMIService = GetObject("winmgmts:{(Security)}\\" & _
strComputer & "\root\cimv2")

Set colEvents = objWMIService.ExecNotificationQuery _
("Select * From __InstanceCreationEvent Where " _
& "TargetInstance isa 'Win32_NTLogEvent'")

Do
Set objEvent = colEvents.NextEvent
If InStr(LCase(objEvent.TargetInstance.Message), "test.vbs") Then
Wscript.Echo Now
Wscript.Echo "Category: " & objEvent.TargetInstance.Category
Wscript.Echo "Event Code: " & objEvent.TargetInstance.EventCode
Wscript.Echo "Message: " & objEvent.TargetInstance.Message
Wscript.Echo "Record Number: " & objEvent.TargetInstance.RecordNumber
Wscript.Echo "Source Name: " & objEvent.TargetInstance.SourceName
Wscript.Echo "Event Type: " & objEvent.TargetInstance.Type
Wscript.Echo
End If
Loop



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a